package exceptionhomework;

public class ThrowDemo {
    public static void main(String[] args) {
        Student zy=new Student();
        try {
            zy.setAge(1000);
            System.out.println(zy.getAge());
        }catch(Exception e){
            System.out.println("年龄不合理");
        }
    }
}
